package cloud.xlh.digital_power_pay.service.order.adapter;

import cloud.xlh.digital_power_pay.domian.order.OrderSaveDomain;
import cloud.xlh.digital_power_pay.infrastructure.order.entity.OrderEntity;
import cloud.xlh.infrastructure.utils.CommonUtil;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/8/12 19:16
 * @ Description:
 */
@Component
public class OrderServiceAdapter {
    public OrderEntity convertOrderEntity(OrderSaveDomain orderSaveDomain) {
        OrderEntity orderEntity = new OrderEntity();
        CommonUtil.copyPropertiesIgnoreCase(orderSaveDomain, orderEntity);
        return orderEntity;
    }
}
